package com.spyrx7.fang_erhuo.base;

import android.app.Application;

import com.squareup.otto.Bus;

/**
 * Created by pc-spyrx7 on 2016/1/13.
 */
public class BaseApplication extends Application {
    private static BaseApplication instance;
    private static volatile Bus bus;
    public static BaseApplication getInstance() {
        return instance;
    }

    public static synchronized Bus getSingleBus() {
     /*   if (bus != null) {
            return bus;  ThreadEnforcer.ANY
        }
        synchronized (BaseApplication.class) {*/
        if (bus == null) {
            bus = new Bus();
        }
        //  }
        return bus;
    }
}
